using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace WorldEditSupport
{
	public class WorldDoc
	{
		private XmlDocument _content;
		public XmlDocument Content
		{
			get { return _content; }
			set { _content = value; }
		}

		public XmlNode OutlineBody
		{
			get { return _content.SelectSingleNode("/opml/body"); }
		}

		// Create a new empty document
		public WorldDoc()
		{
			_content = new XmlDocument();

			// Load an empty valid document
			_content.LoadXml("<opml><body><outline text=\"first node\"/><outline text=\"second node\"/></body></opml>");
		}

		public WorldDoc(string url)
	 	{
			_content = new XmlDocument();
			_content.Load(url);
		}

		public void LoadXml(string xml)
		{
			_content = new XmlDocument();
			_content.LoadXml(xml);
		}
	}
}
